//
//  TZHomeVC.swift
//  SimpleTZ
//
//  Created by wangfeng on 2020/7/9.
//  Copyright © 2020 davis. All rights reserved.
//

import UIKit

class TZHomeVC: TZBaseVC {
    var textView: UITextView = {
        let textView = UITextView()
        return textView
    }()
    var methodBtn: UIButton = {
        let btn = UIButton(type: .custom)
        btn.addTarget(self, action: #selector(methodOne), for: .touchUpInside)
        btn.setTitle("前往下一级界面", for: .normal)
        btn.titleLabel?.textColor = .red
        btn.backgroundColor = .green
        
        return btn
    }()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        view.addSubview(methodBtn)
        methodBtn.snp.makeConstraints { (make) in
            make.left.equalToSuperview().offset(20)
            make.top.equalToSuperview().offset(80)
            make.size.equalTo(CGSize(width: 120, height: 60))
        }
        
        view.addSubview(textView)
        textView.snp.makeConstraints { (make) in
            make.left.right.equalToSuperview()
            make.top.equalToSuperview().offset(180)
            make.height.equalTo(100)
        }

        // Do any additional setup after loading the view.
    }
    
    @objc func methodOne(){
        self.navigationController?.pushViewController(TZSecondVC(), animated: false)
    }
    
}
